package c.f.a.a.a;

import android.app.Activity;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Point;
import android.graphics.drawable.Drawable;
import android.net.wifi.p2p.WifiP2pManager;
import android.os.Build;
import android.os.Build.VERSION;
import android.os.Bundle;
import android.os.Environment;
import android.os.SystemClock;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.View;
import android.view.WindowManager;
import android.widget.TextView;
import b.i.b.f;
import c.f.b.a.a.a.b.b;
import c.h.a.d0.c;
import c.h.a.d0.d;
import c.h.a.d0.g;
import c.h.a.m0.h;
import c.h.a.m0.i;
import c.h.a.m0.k;
import com.huawei.agconnect.exception.AGCServerException;
import com.huawei.hms.game.b0;
import com.huawei.hms.game.f0;
import com.huawei.hms.game.j;
import com.huawei.hms.game.m;
import com.liuzh.deviceinfo.DeviceInfoApp;
import com.pgl.sys.ces.out.ISdkLite;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.math.BigInteger;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Locale;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public final class a {
    public static Context a;

    public static void A(Context context) {
        if (context != null && a == null) {
            a = context.getApplicationContext();
        }
    }

    public static void B(BufferedWriter bufferedWriter, String str) throws IOException {
        int i;
        int i2;
        try {
            i = 0;
            i2 = 0;
            for (PackageInfo packageInfo : DeviceInfoApp.c.getPackageManager().getInstalledPackages(4096)) {
                try {
                    if ((packageInfo.applicationInfo.flags & 1) == 1) {
                        i++;
                    } else {
                        i2++;
                    }
                } catch (Exception unused) {
                }
            }
        } catch (Exception unused2) {
            i = 0;
            i2 = 0;
        }
        bufferedWriter.newLine();
        bufferedWriter.write(String.format(str, new Object[]{s(2131689620)}));
        bufferedWriter.newLine();
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append(s(2131690429));
        String str2 = ": ";
        stringBuilder.append(str2);
        stringBuilder.append(i);
        bufferedWriter.write(stringBuilder.toString());
        bufferedWriter.newLine();
        stringBuilder = new StringBuilder();
        stringBuilder.append(s(2131690544));
        stringBuilder.append(str2);
        stringBuilder.append(i2);
        bufferedWriter.write(stringBuilder.toString());
        bufferedWriter.newLine();
    }

    public static void C(BufferedWriter bufferedWriter, String str) throws IOException {
        bufferedWriter.write(String.format(str, new Object[]{s(2131689626)}));
        bufferedWriter.newLine();
        Intent registerReceiver = DeviceInfoApp.c.registerReceiver(null, new IntentFilter("android.intent.action.BATTERY_CHANGED"));
        if (registerReceiver != null) {
            int intExtra = registerReceiver.getIntExtra("level", 0);
            int intExtra2 = registerReceiver.getIntExtra("voltage", 0);
            int intExtra3 = registerReceiver.getIntExtra("temperature", 0) / 10;
            int intExtra4 = registerReceiver.getIntExtra("status", -1);
            int intExtra5 = registerReceiver.getIntExtra("plugged", -1);
            int intExtra6 = registerReceiver.getIntExtra("health", -1);
            str = registerReceiver.getStringExtra("technology");
            StringBuilder stringBuilder = new StringBuilder();
            stringBuilder.append(intExtra3);
            stringBuilder.append(s(2131690446));
            String stringBuilder2 = stringBuilder.toString();
            stringBuilder = new StringBuilder();
            stringBuilder.append(intExtra2);
            stringBuilder.append(s(2131690060));
            String stringBuilder3 = stringBuilder.toString();
            stringBuilder = new StringBuilder();
            stringBuilder.append(s(2131689627));
            String str2 = ": ";
            stringBuilder.append(str2);
            stringBuilder.append(k.f());
            stringBuilder.append(s(2131690062));
            bufferedWriter.write(stringBuilder.toString());
            bufferedWriter.newLine();
            stringBuilder = new StringBuilder();
            c.b.a.a.a.l(2131689966, stringBuilder, str2);
            stringBuilder.append(k.g(intExtra6, DeviceInfoApp.c));
            bufferedWriter.write(stringBuilder.toString());
            bufferedWriter.newLine();
            StringBuilder stringBuilder4 = new StringBuilder();
            stringBuilder4.append(s(2131689631));
            stringBuilder4.append(str2);
            stringBuilder4.append(intExtra);
            stringBuilder4.append("%");
            bufferedWriter.write(stringBuilder4.toString());
            bufferedWriter.newLine();
            StringBuilder stringBuilder5 = new StringBuilder();
            c.b.a.a.a.l(2131690399, stringBuilder5, str2);
            stringBuilder5.append(k.i(intExtra4, DeviceInfoApp.c));
            bufferedWriter.write(stringBuilder5.toString());
            bufferedWriter.newLine();
            stringBuilder5 = new StringBuilder();
            c.b.a.a.a.l(2131690186, stringBuilder5, str2);
            stringBuilder5.append(k.h(intExtra5, DeviceInfoApp.c));
            bufferedWriter.write(stringBuilder5.toString());
            bufferedWriter.newLine();
            stringBuilder5 = new StringBuilder();
            stringBuilder5.append(s(2131690445));
            stringBuilder5.append(str2);
            stringBuilder5.append(str);
            bufferedWriter.write(stringBuilder5.toString());
            bufferedWriter.newLine();
            StringBuilder stringBuilder6 = new StringBuilder();
            stringBuilder6.append(s(2131690447));
            stringBuilder6.append(str2);
            stringBuilder6.append(stringBuilder2);
            bufferedWriter.write(stringBuilder6.toString());
            bufferedWriter.newLine();
            stringBuilder6 = new StringBuilder();
            stringBuilder6.append(s(2131690555));
            stringBuilder6.append(str2);
            stringBuilder6.append(stringBuilder3);
            bufferedWriter.write(stringBuilder6.toString());
        }
        bufferedWriter.newLine();
    }

    /* JADX WARNING: No exception handlers in catch block: Catch:{  } */
    public static void D(java.io.BufferedWriter r13, java.lang.String r14, java.lang.String r15) throws java.io.IOException {
        /*
        r0 = ": ";
        r1 = com.liuzh.deviceinfo.DeviceInfoApp.c;
        r2 = "camera";
        r1 = r1.getSystemService(r2);
        r1 = (android.hardware.camera2.CameraManager) r1;
        if (r1 == 0) goto L_0x0159;
    L_0x000e:
        r13.newLine();
        r2 = 1;
        r3 = new java.lang.Object[r2];
        r4 = 2131689672; // 0x7f0f00c8 float:1.9008366E38 double:1.0531946345E-314;
        r4 = s(r4);
        r5 = 0;
        r3[r5] = r4;
        r14 = java.lang.String.format(r14, r3);
        r13.write(r14);
        r13.newLine();
        r14 = 0;
        r14 = r1.getCameraIdList();	 Catch:{ Exception -> 0x002e }
        goto L_0x002f;
    L_0x002f:
        if (r14 == 0) goto L_0x0159;
    L_0x0031:
        r3 = r14.length;
        r4 = 0;
    L_0x0033:
        if (r4 >= r3) goto L_0x0159;
    L_0x0035:
        r6 = r14[r4];
        r7 = r1.getCameraCharacteristics(r6);	 Catch:{  }
        r8 = android.hardware.camera2.CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP;	 Catch:{  }
        r8 = r7.get(r8);	 Catch:{  }
        r8 = (android.hardware.camera2.params.StreamConfigurationMap) r8;	 Catch:{  }
        if (r8 != 0) goto L_0x0047;
    L_0x0045:
        goto L_0x0155;
    L_0x0047:
        r9 = 256; // 0x100 float:3.59E-43 double:1.265E-321;
        r8 = r8.getOutputSizes(r9);	 Catch:{  }
        r9 = android.hardware.camera2.CameraCharacteristics.LENS_FACING;	 Catch:{  }
        r9 = r7.get(r9);	 Catch:{  }
        r9 = (java.lang.Integer) r9;	 Catch:{  }
        r10 = 2131690514; // 0x7f0f0412 float:1.9010074E38 double:1.0531950505E-314;
        if (r9 == 0) goto L_0x0082;
    L_0x005a:
        r9 = r9.intValue();	 Catch:{  }
        if (r9 == 0) goto L_0x007a;
    L_0x0060:
        if (r9 == r2) goto L_0x0072;
    L_0x0062:
        r11 = 2;
        if (r9 == r11) goto L_0x006a;
    L_0x0065:
        r9 = s(r10);	 Catch:{  }
        goto L_0x0086;
    L_0x006a:
        r9 = 2131689834; // 0x7f0f016a float:1.9008695E38 double:1.0531947146E-314;
        r9 = s(r9);	 Catch:{  }
        goto L_0x0086;
    L_0x0072:
        r9 = 2131689683; // 0x7f0f00d3 float:1.9008388E38 double:1.05319464E-314;
        r9 = s(r9);	 Catch:{  }
        goto L_0x0086;
    L_0x007a:
        r9 = 2131689698; // 0x7f0f00e2 float:1.9008419E38 double:1.0531946474E-314;
        r9 = s(r9);	 Catch:{  }
        goto L_0x0086;
    L_0x0082:
        r9 = s(r10);	 Catch:{  }
    L_0x0086:
        if (r8 != 0) goto L_0x008a;
    L_0x0088:
        goto L_0x0155;
    L_0x008a:
        r10 = android.hardware.camera2.CameraCharacteristics.LENS_INFO_AVAILABLE_FOCAL_LENGTHS;	 Catch:{  }
        r7 = r7.get(r10);	 Catch:{  }
        r7 = (float[]) r7;	 Catch:{  }
        r13.newLine();	 Catch:{  }
        r10 = new java.lang.Object[r2];	 Catch:{  }
        r11 = new java.lang.StringBuilder;	 Catch:{  }
        r11.<init>();	 Catch:{  }
        r12 = c.h.a.m0.k.n(r8);	 Catch:{  }
        r11.append(r12);	 Catch:{  }
        r12 = " - ";
        r11.append(r12);	 Catch:{  }
        r11.append(r9);	 Catch:{  }
        r9 = r11.toString();	 Catch:{  }
        r10[r5] = r9;	 Catch:{  }
        r9 = java.lang.String.format(r15, r10);	 Catch:{  }
        r13.write(r9);	 Catch:{  }
        r13.newLine();	 Catch:{  }
        r9 = new java.lang.StringBuilder;	 Catch:{  }
        r9.<init>();	 Catch:{  }
        r10 = 2131690234; // 0x7f0f02fa float:1.9009506E38 double:1.053194912E-314;
        r10 = s(r10);	 Catch:{  }
        r9.append(r10);	 Catch:{  }
        r9.append(r0);	 Catch:{  }
        r8 = c.h.a.m0.k.o(r8);	 Catch:{  }
        r9.append(r8);	 Catch:{  }
        r8 = r9.toString();	 Catch:{  }
        r13.write(r8);	 Catch:{  }
        r13.newLine();	 Catch:{  }
        r8 = new java.lang.StringBuilder;	 Catch:{  }
        r8.<init>();	 Catch:{  }
        r9 = 2131689696; // 0x7f0f00e0 float:1.9008415E38 double:1.0531946464E-314;
        r9 = s(r9);	 Catch:{  }
        r8.append(r9);	 Catch:{  }
        r8.append(r0);	 Catch:{  }
        if (r7 == 0) goto L_0x00fc;
    L_0x00f2:
        r9 = r7.length;	 Catch:{  }
        if (r9 == 0) goto L_0x00fc;
    L_0x00f5:
        r7 = r7[r5];	 Catch:{  }
        r7 = java.lang.Float.valueOf(r7);	 Catch:{  }
        goto L_0x00fe;
    L_0x00fc:
        r7 = "-";
    L_0x00fe:
        r8.append(r7);	 Catch:{  }
        r7 = " mm";
        r8.append(r7);	 Catch:{  }
        r7 = r8.toString();	 Catch:{  }
        r13.write(r7);	 Catch:{  }
        r13.newLine();	 Catch:{  }
        r6 = r1.getCameraCharacteristics(r6);	 Catch:{ Exception -> 0x0155 }
        r7 = r6.getKeys();	 Catch:{  }
        r7 = r7.iterator();	 Catch:{  }
    L_0x011c:
        r8 = r7.hasNext();	 Catch:{  }
        if (r8 == 0) goto L_0x0155;
    L_0x0122:
        r8 = r7.next();	 Catch:{  }
        r8 = (android.hardware.camera2.CameraCharacteristics.Key) r8;	 Catch:{  }
        r9 = c.h.a.m0.k.m(r8, r6);	 Catch:{  }
        r10 = android.text.TextUtils.isEmpty(r9);	 Catch:{  }
        if (r10 != 0) goto L_0x011c;
    L_0x0132:
        r10 = new java.lang.StringBuilder;	 Catch:{  }
        r10.<init>();	 Catch:{  }
        r8 = r8.getName();	 Catch:{  }
        r11 = com.liuzh.deviceinfo.DeviceInfoApp.c;	 Catch:{  }
        r8 = c.h.a.m0.k.y(r8, r11);	 Catch:{  }
        r10.append(r8);	 Catch:{  }
        r10.append(r0);	 Catch:{  }
        r10.append(r9);	 Catch:{  }
        r8 = r10.toString();	 Catch:{  }
        r13.write(r8);	 Catch:{  }
        r13.newLine();	 Catch:{  }
        goto L_0x011c;
    L_0x0155:
        r4 = r4 + 1;
        goto L_0x0033;
    L_0x0159:
        return;
        */
        throw new UnsupportedOperationException("Method not decompiled: c.f.a.a.a.a.D(java.io.BufferedWriter, java.lang.String, java.lang.String):void");
    }

    public static void E(BufferedWriter bufferedWriter, String str) throws IOException {
        bufferedWriter.newLine();
        Object[] objArr = new Object[1];
        int i = 0;
        objArr[0] = s(2131689767);
        bufferedWriter.write(String.format(str, objArr));
        bufferedWriter.newLine();
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append(s(2131689962));
        String str2 = ": ";
        stringBuilder.append(str2);
        stringBuilder.append(k.q());
        bufferedWriter.write(stringBuilder.toString());
        bufferedWriter.newLine();
        stringBuilder = new StringBuilder();
        stringBuilder.append(s(2131689766));
        stringBuilder.append(str2);
        stringBuilder.append(Runtime.getRuntime().availableProcessors());
        bufferedWriter.write(stringBuilder.toString());
        bufferedWriter.newLine();
        float[] p = k.p();
        StringBuilder stringBuilder2 = new StringBuilder();
        Locale locale = Locale.US;
        String str3 = "%.0f";
        stringBuilder2.append(String.format(locale, str3, new Object[]{Float.valueOf(p[0])}));
        stringBuilder2.append("MHz - ");
        stringBuilder2.append(String.format(locale, str3, new Object[]{Float.valueOf(p[1])}));
        stringBuilder2.append("MHz");
        str = stringBuilder2.toString();
        StringBuilder stringBuilder3 = new StringBuilder();
        stringBuilder3.append(s(2131689768));
        stringBuilder3.append(str2);
        stringBuilder3.append(str);
        bufferedWriter.write(stringBuilder3.toString());
        bufferedWriter.newLine();
        ArrayList P = k.P();
        while (i < P.size()) {
            c cVar = (c) P.get(i);
            stringBuilder2 = new StringBuilder();
            stringBuilder2.append(cVar.a);
            stringBuilder2.append(str2);
            stringBuilder2.append(cVar.b);
            bufferedWriter.write(stringBuilder2.toString());
            bufferedWriter.newLine();
            i++;
        }
        stringBuilder = new StringBuilder();
        c.b.a.a.a.l(2131690196, stringBuilder, str2);
        stringBuilder.append(k.D(DeviceInfoApp.c));
        bufferedWriter.write(stringBuilder.toString());
        bufferedWriter.newLine();
        stringBuilder = new StringBuilder();
        stringBuilder.append(s(2131690425));
        stringBuilder.append(str2);
        stringBuilder.append(k.K());
        bufferedWriter.write(stringBuilder.toString());
        bufferedWriter.newLine();
        stringBuilder = new StringBuilder();
        stringBuilder.append(s(2131689770));
        stringBuilder.append(str2);
        stringBuilder.append(k.q());
        bufferedWriter.write(stringBuilder.toString());
        bufferedWriter.newLine();
        stringBuilder = new StringBuilder();
        stringBuilder.append(s(2131689769));
        stringBuilder.append(str2);
        stringBuilder.append(k.l());
        bufferedWriter.write(stringBuilder.toString());
        bufferedWriter.newLine();
        bufferedWriter.newLine();
        stringBuilder = new StringBuilder();
        c.b.a.a.a.l(2131689952, stringBuilder, str2);
        i iVar = i.a;
        iVar = i.a;
        SharedPreferences sharedPreferences = i.b;
        String str4 = "";
        stringBuilder.append(sharedPreferences.getString("gpu_render", str4));
        bufferedWriter.write(stringBuilder.toString());
        bufferedWriter.newLine();
        stringBuilder = new StringBuilder();
        stringBuilder.append(s(2131689953));
        stringBuilder.append(str2);
        stringBuilder.append(sharedPreferences.getString("gpu_vendor", str4));
        bufferedWriter.write(stringBuilder.toString());
        bufferedWriter.newLine();
        stringBuilder = new StringBuilder();
        stringBuilder.append(s(2131689954));
        stringBuilder.append(str2);
        stringBuilder.append(sharedPreferences.getString("gpu_version", str4));
        bufferedWriter.write(stringBuilder.toString());
        bufferedWriter.newLine();
    }

    /* JADX WARNING: Removed duplicated region for block: B:10:0x0147 A:{Catch:{ Exception -> 0x016e }} */
    /* JADX WARNING: Removed duplicated region for block: B:15:0x01ad  */
    /* JADX WARNING: Missing exception handler attribute for start block: B:7:0x0135 */
    /* JADX WARNING: Failed to process nested try/catch */
    /* JADX WARNING: Can't wrap try/catch for region: R(13:0|(1:2)|3|4|(1:6)|7|8|(1:10)|11|13|(2:15|(3:17|(1:19)|20))|21|22) */
    @android.annotation.SuppressLint({"HardwareIds"})
    public static void F(java.io.BufferedWriter r4, java.lang.String r5) throws java.io.IOException {
        /*
        r4.newLine();
        r0 = 1;
        r0 = new java.lang.Object[r0];
        r1 = com.liuzh.deviceinfo.DeviceInfoApp.c;
        r2 = 2131690435; // 0x7f0f03c3 float:1.9009914E38 double:1.0531950115E-314;
        r1 = r1.getString(r2);
        r3 = 0;
        r0[r3] = r1;
        r5 = java.lang.String.format(r5, r0);
        r4.write(r5);
        r4.newLine();
        r5 = new java.lang.StringBuilder;
        r5.<init>();
        r0 = 2131689793; // 0x7f0f0141 float:1.9008611E38 double:1.0531946943E-314;
        r0 = s(r0);
        r5.append(r0);
        r0 = ": ";
        r5.append(r0);
        r1 = q();
        r5.append(r1);
        r5 = r5.toString();
        r4.write(r5);
        r4.newLine();
        r5 = new java.lang.StringBuilder;
        r5.<init>();
        r1 = 2131690078; // 0x7f0f025e float:1.900919E38 double:1.053194835E-314;
        c.b.a.a.a.l(r1, r5, r0);
        r1 = android.os.Build.MODEL;
        r5.append(r1);
        r5 = r5.toString();
        r4.write(r5);
        r4.newLine();
        r5 = new java.lang.StringBuilder;
        r5.<init>();
        r1 = 2131690064; // 0x7f0f0250 float:1.9009161E38 double:1.053194828E-314;
        c.b.a.a.a.l(r1, r5, r0);
        r1 = android.os.Build.MANUFACTURER;
        r5.append(r1);
        r5 = r5.toString();
        r4.write(r5);
        r4.newLine();
        r5 = new java.lang.StringBuilder;
        r5.<init>();
        c.b.a.a.a.l(r2, r5, r0);
        r1 = android.os.Build.DEVICE;
        r5.append(r1);
        r5 = r5.toString();
        r4.write(r5);
        r4.newLine();
        r5 = new java.lang.StringBuilder;
        r5.<init>();
        r1 = 2131689637; // 0x7f0f00a5 float:1.9008295E38 double:1.053194617E-314;
        c.b.a.a.a.l(r1, r5, r0);
        r1 = android.os.Build.BOARD;
        r5.append(r1);
        r5 = r5.toString();
        r4.write(r5);
        r4.newLine();
        r5 = new java.lang.StringBuilder;
        r5.<init>();
        r1 = 2131689962; // 0x7f0f01ea float:1.9008954E38 double:1.053194778E-314;
        c.b.a.a.a.l(r1, r5, r0);
        r1 = android.os.Build.HARDWARE;
        r5.append(r1);
        r5 = r5.toString();
        r4.write(r5);
        r4.newLine();
        r5 = new java.lang.StringBuilder;
        r5.<init>();
        r1 = 2131689640; // 0x7f0f00a8 float:1.9008301E38 double:1.0531946187E-314;
        c.b.a.a.a.l(r1, r5, r0);
        r1 = android.os.Build.BRAND;
        r5.append(r1);
        r5 = r5.toString();
        r4.write(r5);
        r4.newLine();
        r4.newLine();
        r5 = com.liuzh.deviceinfo.DeviceInfoApp.c;
        r5 = c.h.a.m0.k.t(r5);
        r1 = android.text.TextUtils.isEmpty(r5);
        if (r1 != 0) goto L_0x0108;
    L_0x00e9:
        r1 = new java.lang.StringBuilder;
        r1.<init>();
        r2 = 2131689959; // 0x7f0f01e7 float:1.9008948E38 double:1.0531947763E-314;
        r2 = s(r2);
        r1.append(r2);
        r1.append(r0);
        r1.append(r5);
        r5 = r1.toString();
        r4.write(r5);
        r4.newLine();
    L_0x0108:
        r5 = com.liuzh.deviceinfo.DeviceInfoApp.c;	 Catch:{ Exception -> 0x0135 }
        r5 = c.e.a.b.a.a.a.b(r5);	 Catch:{ Exception -> 0x0135 }
        r5 = r5.a;	 Catch:{ Exception -> 0x0135 }
        r1 = android.text.TextUtils.isEmpty(r5);	 Catch:{ Exception -> 0x0135 }
        if (r1 != 0) goto L_0x0135;
    L_0x0116:
        r1 = new java.lang.StringBuilder;	 Catch:{ Exception -> 0x0135 }
        r1.<init>();	 Catch:{ Exception -> 0x0135 }
        r2 = 2131689938; // 0x7f0f01d2 float:1.9008906E38 double:1.053194766E-314;
        r2 = s(r2);	 Catch:{ Exception -> 0x0135 }
        r1.append(r2);	 Catch:{ Exception -> 0x0135 }
        r1.append(r0);	 Catch:{ Exception -> 0x0135 }
        r1.append(r5);	 Catch:{ Exception -> 0x0135 }
        r5 = r1.toString();	 Catch:{ Exception -> 0x0135 }
        r4.write(r5);	 Catch:{ Exception -> 0x0135 }
        r4.newLine();	 Catch:{ Exception -> 0x0135 }
    L_0x0135:
        r5 = com.liuzh.deviceinfo.DeviceInfoApp.c;	 Catch:{ Exception -> 0x016e }
        r5 = r5.getContentResolver();	 Catch:{ Exception -> 0x016e }
        r1 = "android_id";
        r5 = android.provider.Settings.Secure.getString(r5, r1);	 Catch:{ Exception -> 0x016e }
        r1 = android.text.TextUtils.isEmpty(r5);	 Catch:{ Exception -> 0x016e }
        if (r1 == 0) goto L_0x014e;
    L_0x0147:
        r5 = 2131690514; // 0x7f0f0412 float:1.9010074E38 double:1.0531950505E-314;
        r5 = s(r5);	 Catch:{ Exception -> 0x016e }
    L_0x014e:
        r1 = new java.lang.StringBuilder;	 Catch:{ Exception -> 0x016e }
        r1.<init>();	 Catch:{ Exception -> 0x016e }
        r2 = 2131689557; // 0x7f0f0055 float:1.9008133E38 double:1.0531945777E-314;
        r2 = s(r2);	 Catch:{ Exception -> 0x016e }
        r1.append(r2);	 Catch:{ Exception -> 0x016e }
        r1.append(r0);	 Catch:{ Exception -> 0x016e }
        r1.append(r5);	 Catch:{ Exception -> 0x016e }
        r5 = r1.toString();	 Catch:{ Exception -> 0x016e }
        r4.write(r5);	 Catch:{ Exception -> 0x016e }
        r4.newLine();	 Catch:{ Exception -> 0x016e }
        goto L_0x016f;
    L_0x016f:
        r5 = new java.lang.StringBuilder;
        r5.<init>();
        r1 = 2131689963; // 0x7f0f01eb float:1.9008956E38 double:1.0531947783E-314;
        c.b.a.a.a.l(r1, r5, r0);
        r1 = android.os.Build.SERIAL;
        r5.append(r1);
        r5 = r5.toString();
        r4.write(r5);
        r4.newLine();
        r5 = new java.lang.StringBuilder;
        r5.<init>();
        r1 = 2131689644; // 0x7f0f00ac float:1.900831E38 double:1.0531946207E-314;
        c.b.a.a.a.l(r1, r5, r0);
        r1 = android.os.Build.FINGERPRINT;
        r5.append(r1);
        r5 = r5.toString();
        r4.write(r5);
        r4.newLine();
        r5 = com.liuzh.deviceinfo.DeviceInfoApp.c;
        r1 = "android.permission.READ_PHONE_STATE";
        r5 = b.i.c.a.a(r5, r1);
        if (r5 != 0) goto L_0x0293;
    L_0x01ad:
        r5 = com.liuzh.deviceinfo.DeviceInfoApp.c;
        r1 = "phone";
        r5 = r5.getSystemService(r1);
        r5 = (android.telephony.TelephonyManager) r5;
        if (r5 == 0) goto L_0x0293;
    L_0x01b9:
        r1 = new java.lang.StringBuilder;
        r1.<init>();
        r2 = 2131689794; // 0x7f0f0142 float:1.9008613E38 double:1.053194695E-314;
        r2 = s(r2);
        r1.append(r2);
        r1.append(r0);
        r2 = r5.getPhoneType();
        r2 = c.h.a.m0.k.c(r2);
        r1.append(r2);
        r1 = r1.toString();
        r4.write(r1);
        r4.newLine();
        r1 = c.h.a.m0.h.b;
        if (r1 != 0) goto L_0x024d;
    L_0x01e4:
        r1 = new java.lang.StringBuilder;
        r1.<init>();
        r2 = 2131690004; // 0x7f0f0214 float:1.900904E38 double:1.0531947986E-314;
        r2 = s(r2);
        r1.append(r2);
        r1.append(r0);
        r2 = r5.getDeviceId();
        r1.append(r2);
        r1 = r1.toString();
        r4.write(r1);
        r4.newLine();
        r1 = new java.lang.StringBuilder;
        r1.<init>();
        r2 = 2131690362; // 0x7f0f037a float:1.9009765E38 double:1.0531949754E-314;
        r2 = s(r2);
        r1.append(r2);
        r1.append(r0);
        r2 = r5.getSimSerialNumber();
        r1.append(r2);
        r1 = r1.toString();
        r4.write(r1);
        r4.newLine();
        r1 = new java.lang.StringBuilder;
        r1.<init>();
        r2 = 2131690363; // 0x7f0f037b float:1.9009768E38 double:1.053194976E-314;
        r2 = s(r2);
        r1.append(r2);
        r1.append(r0);
        r2 = r5.getSubscriberId();
        r1.append(r2);
        r1 = r1.toString();
        r4.write(r1);
        r4.newLine();
    L_0x024d:
        r1 = new java.lang.StringBuilder;
        r1.<init>();
        r2 = 2131690125; // 0x7f0f028d float:1.9009285E38 double:1.0531948583E-314;
        r2 = s(r2);
        r1.append(r2);
        r1.append(r0);
        r2 = r5.getNetworkOperatorName();
        r1.append(r2);
        r1 = r1.toString();
        r4.write(r1);
        r4.newLine();
        r1 = new java.lang.StringBuilder;
        r1.<init>();
        r2 = 2131690126; // 0x7f0f028e float:1.9009287E38 double:1.053194859E-314;
        r2 = s(r2);
        r1.append(r2);
        r1.append(r0);
        r5 = r5.getNetworkType();
        r1.append(r5);
        r5 = r1.toString();
        r4.write(r5);
        r4.newLine();
    L_0x0293:
        r5 = new java.lang.StringBuilder;
        r5.<init>();
        r1 = 2131690568; // 0x7f0f0448 float:1.9010183E38 double:1.053195077E-314;
        r1 = s(r1);
        r5.append(r1);
        r5.append(r0);
        r1 = c.h.a.m0.k.N();
        r5.append(r1);
        r5 = r5.toString();
        r4.write(r5);
        r4.newLine();
        r5 = new java.lang.StringBuilder;
        r5.<init>();
        r1 = 2131689634; // 0x7f0f00a2 float:1.9008289E38 double:1.053194616E-314;
        c.b.a.a.a.l(r1, r5, r0);
        r0 = com.liuzh.deviceinfo.DeviceInfoApp.c;
        r0 = c.h.a.m0.k.j(r0);
        r5.append(r0);
        r5 = r5.toString();
        r4.write(r5);
        r4.newLine();
        return;
        */
        throw new UnsupportedOperationException("Method not decompiled: c.f.a.a.a.a.F(java.io.BufferedWriter, java.lang.String):void");
    }

    public static void G(BufferedWriter bufferedWriter, String str, String str2) throws IOException {
        bufferedWriter.newLine();
        bufferedWriter.write(String.format(str, new Object[]{s(2131690124)}));
        bufferedWriter.newLine();
        bufferedWriter.newLine();
        bufferedWriter.write(String.format(str2, new Object[]{s(2131690565)}));
        bufferedWriter.newLine();
        WifiP2pManager wifiP2pManager = (WifiP2pManager) DeviceInfoApp.c.getSystemService("wifip2p");
        StringBuilder stringBuilder = new StringBuilder();
        String str3 = ": ";
        c.b.a.a.a.l(2131690567, stringBuilder, str3);
        int i = 2131690424;
        stringBuilder.append(s(wifiP2pManager == null ? 2131690139 : 2131690424));
        bufferedWriter.write(stringBuilder.toString());
        bufferedWriter.newLine();
        bufferedWriter.newLine();
        bufferedWriter.write(String.format(str2, new Object[]{s(2131690077)}));
        bufferedWriter.newLine();
        StringBuilder stringBuilder2 = new StringBuilder();
        stringBuilder2.append(s(2131690118));
        stringBuilder2.append(str3);
        if (!c.h.a.m0.r.a.C()) {
            i = 2131690139;
        }
        stringBuilder2.append(s(i));
        bufferedWriter.write(stringBuilder2.toString());
        bufferedWriter.newLine();
        if (f.T(DeviceInfoApp.c, "android.permission.READ_PHONE_STATE") == 0) {
            TelephonyManager telephonyManager = (TelephonyManager) DeviceInfoApp.c.getSystemService("phone");
            if (telephonyManager != null) {
                StringBuilder stringBuilder3 = new StringBuilder();
                stringBuilder3.append(s(2131689794));
                stringBuilder3.append(str3);
                stringBuilder3.append(k.c(telephonyManager.getPhoneType()));
                bufferedWriter.write(stringBuilder3.toString());
                bufferedWriter.newLine();
            }
        }
        if (b.i.c.a.a(DeviceInfoApp.c, "android.permission.ACCESS_FINE_LOCATION") == 0) {
            stringBuilder2 = new StringBuilder();
            stringBuilder2.append(s(2131689741));
            stringBuilder2.append(str3);
            stringBuilder2.append(c.h.a.m0.r.a.t());
            bufferedWriter.write(stringBuilder2.toString());
            bufferedWriter.newLine();
            stringBuilder2 = new StringBuilder();
            stringBuilder2.append(s(2131690457));
            stringBuilder2.append(str3);
            stringBuilder2.append(c.h.a.m0.r.a.w());
            bufferedWriter.write(stringBuilder2.toString());
            bufferedWriter.newLine();
        }
    }

    public static void H(BufferedWriter bufferedWriter, String str) throws IOException {
        StringBuilder stringBuilder;
        bufferedWriter.newLine();
        bufferedWriter.write(String.format(str, new Object[]{s(2131689800)}));
        bufferedWriter.newLine();
        str = k.z();
        String str2 = ": ";
        if (!s(2131690514).equals(str)) {
            StringBuilder stringBuilder2 = new StringBuilder();
            stringBuilder2.append(s(2131690165));
            stringBuilder2.append(str2);
            stringBuilder2.append(str);
            bufferedWriter.write(stringBuilder2.toString());
            bufferedWriter.newLine();
        }
        WindowManager windowManager = (WindowManager) DeviceInfoApp.c.getSystemService("window");
        String str3 = "%.2f";
        if (windowManager != null) {
            stringBuilder = new StringBuilder();
            stringBuilder.append(s(2131690120));
            stringBuilder.append(str2);
            stringBuilder.append(windowManager.getDefaultDisplay().getName());
            bufferedWriter.write(stringBuilder.toString());
            bufferedWriter.newLine();
            Point point = new Point();
            windowManager.getDefaultDisplay().getRealSize(point);
            StringBuilder stringBuilder3 = new StringBuilder();
            c.b.a.a.a.l(2131690274, stringBuilder3, str2);
            stringBuilder3.append(point.y);
            stringBuilder3.append(s(2131690212));
            bufferedWriter.write(stringBuilder3.toString());
            bufferedWriter.newLine();
            stringBuilder3 = new StringBuilder();
            c.b.a.a.a.l(2131690275, stringBuilder3, str2);
            stringBuilder3.append(point.x);
            stringBuilder3.append(s(2131690212));
            bufferedWriter.write(stringBuilder3.toString());
            bufferedWriter.newLine();
            stringBuilder = new StringBuilder();
            c.b.a.a.a.l(2131690221, stringBuilder, str2);
            stringBuilder.append(String.format(Locale.US, str3, new Object[]{Float.valueOf(r9.getRefreshRate())}));
            stringBuilder.append(s(2131689935));
            bufferedWriter.write(stringBuilder.toString());
            bufferedWriter.newLine();
        }
        Configuration configuration = DeviceInfoApp.c.getResources().getConfiguration();
        stringBuilder = new StringBuilder();
        stringBuilder.append(s(2131690272));
        stringBuilder.append(str2);
        stringBuilder.append(k.G(configuration));
        bufferedWriter.write(stringBuilder.toString());
        bufferedWriter.newLine();
        stringBuilder = new StringBuilder();
        c.b.a.a.a.l(2131690268, stringBuilder, str2);
        Locale locale = Locale.US;
        stringBuilder.append(String.format(locale, str3, new Object[]{Float.valueOf(h.l())}));
        stringBuilder.append(" ");
        stringBuilder.append(s(2131690005));
        bufferedWriter.write(stringBuilder.toString());
        bufferedWriter.newLine();
        stringBuilder = new StringBuilder();
        stringBuilder.append(s(2131690156));
        stringBuilder.append(str2);
        stringBuilder.append(k.F(configuration));
        bufferedWriter.write(stringBuilder.toString());
        bufferedWriter.newLine();
        StringBuilder stringBuilder4 = new StringBuilder();
        stringBuilder4.append(s(2131689641));
        stringBuilder4.append(str2);
        stringBuilder4.append(k.k());
        bufferedWriter.write(stringBuilder4.toString());
        bufferedWriter.newLine();
        stringBuilder4 = new StringBuilder();
        stringBuilder4.append(s(2131690273));
        stringBuilder4.append(str2);
        stringBuilder4.append(k.H());
        bufferedWriter.write(stringBuilder4.toString());
        bufferedWriter.newLine();
        bufferedWriter.newLine();
        stringBuilder4 = new StringBuilder();
        stringBuilder4.append(s(2131690262));
        stringBuilder4.append(str2);
        stringBuilder4.append(h.i());
        bufferedWriter.write(stringBuilder4.toString());
        bufferedWriter.newLine();
        DisplayMetrics displayMetrics = Resources.getSystem().getDisplayMetrics();
        stringBuilder = new StringBuilder();
        c.b.a.a.a.l(2131690263, stringBuilder, str2);
        stringBuilder.append(displayMetrics.densityDpi);
        String str4 = " dpi";
        stringBuilder.append(str4);
        bufferedWriter.write(stringBuilder.toString());
        bufferedWriter.newLine();
        stringBuilder = new StringBuilder();
        c.b.a.a.a.l(2131690572, stringBuilder, str2);
        stringBuilder.append(displayMetrics.xdpi);
        stringBuilder.append(str4);
        bufferedWriter.write(stringBuilder.toString());
        bufferedWriter.newLine();
        stringBuilder = new StringBuilder();
        c.b.a.a.a.l(2131690574, stringBuilder, str2);
        stringBuilder.append(displayMetrics.ydpi);
        stringBuilder.append(str4);
        bufferedWriter.write(stringBuilder.toString());
        bufferedWriter.newLine();
        stringBuilder = new StringBuilder();
        c.b.a.a.a.l(2131690266, stringBuilder, str2);
        stringBuilder.append(String.format(locale, str3, new Object[]{Float.valueOf(displayMetrics.density)}));
        bufferedWriter.write(stringBuilder.toString());
        bufferedWriter.newLine();
        stringBuilder = new StringBuilder();
        c.b.a.a.a.l(2131690271, stringBuilder, str2);
        stringBuilder.append(String.format(locale, str3, new Object[]{Float.valueOf(displayMetrics.scaledDensity)}));
        bufferedWriter.write(stringBuilder.toString());
        bufferedWriter.newLine();
        stringBuilder4 = new StringBuilder();
        c.b.a.a.a.l(2131689934, stringBuilder4, str2);
        stringBuilder4.append(String.format(locale, str3, new Object[]{Float.valueOf(DeviceInfoApp.c.getResources().getConfiguration().fontScale)}));
        bufferedWriter.write(stringBuilder4.toString());
        bufferedWriter.newLine();
    }

    public static void I(BufferedWriter bufferedWriter, String str, String str2) throws IOException {
        bufferedWriter.newLine();
        bufferedWriter.write(String.format(str, new Object[]{s(2131690324)}));
        bufferedWriter.newLine();
        for (c.h.a.d0.f fVar : k.e()) {
            String str3;
            bufferedWriter.newLine();
            if (s(2131690514).equals(fVar.c)) {
                str3 = fVar.a;
            } else {
                str3 = fVar.c;
            }
            bufferedWriter.write(String.format(str2, new Object[]{str3}));
            bufferedWriter.newLine();
            bufferedWriter.write(fVar.b);
            bufferedWriter.newLine();
            bufferedWriter.write(fVar.a);
            bufferedWriter.newLine();
            bufferedWriter.write(fVar.d);
            bufferedWriter.newLine();
            bufferedWriter.write(fVar.e);
            bufferedWriter.newLine();
        }
    }

    /* JADX WARNING: Removed duplicated region for block: B:13:? A:{SYNTHETIC, RETURN} */
    /* JADX WARNING: Removed duplicated region for block: B:11:0x0141  */
    public static void J(java.io.BufferedWriter r13, java.lang.String r14, java.lang.String r15) throws java.io.IOException {
        /*
        r13.newLine();
        r0 = 1;
        r1 = new java.lang.Object[r0];
        r2 = 2131690403; // 0x7f0f03a3 float:1.9009849E38 double:1.0531949957E-314;
        r2 = s(r2);
        r3 = 0;
        r1[r3] = r2;
        r14 = java.lang.String.format(r14, r1);
        r13.write(r14);
        r13.newLine();
        r13.newLine();
        r14 = new java.lang.Object[r0];
        r1 = "RAM";
        r14[r3] = r1;
        r14 = java.lang.String.format(r15, r14);
        r13.write(r14);
        r13.newLine();
        r14 = com.liuzh.deviceinfo.DeviceInfoApp.c;
        r14 = r14.getApplicationContext();
        r1 = 0;
        r4 = new android.app.ActivityManager$MemoryInfo;	 Catch:{ Exception -> 0x005a }
        r4.<init>();	 Catch:{ Exception -> 0x005a }
        r5 = "activity";
        r14 = r14.getSystemService(r5);	 Catch:{ Exception -> 0x005a }
        r14 = (android.app.ActivityManager) r14;	 Catch:{ Exception -> 0x005a }
        if (r14 != 0) goto L_0x0045;
    L_0x0044:
        goto L_0x005a;
    L_0x0045:
        r14.getMemoryInfo(r4);	 Catch:{ Exception -> 0x005a }
        r5 = r4.availMem;	 Catch:{ Exception -> 0x005a }
        r7 = 1024; // 0x400 float:1.435E-42 double:5.06E-321;
        r5 = r5 / r7;
        r5 = r5 / r7;
        r5 = (double) r5;	 Catch:{ Exception -> 0x005a }
        r9 = r4.totalMem;	 Catch:{ Exception -> 0x005a }
        r9 = r9 / r7;
        r9 = r9 / r7;
        r1 = (double) r9;
        r4 = r1 - r5;
        r11 = r1;
        r1 = r4;
        r4 = r11;
        goto L_0x005b;
    L_0x005a:
        r4 = r1;
    L_0x005b:
        r14 = new java.lang.StringBuilder;
        r14.<init>();
        r6 = 2131690543; // 0x7f0f042f float:1.9010133E38 double:1.053195065E-314;
        r6 = s(r6);
        r14.append(r6);
        r6 = ": ";
        r14.append(r6);
        r7 = java.util.Locale.getDefault();
        r8 = new java.lang.Object[r0];
        r1 = java.lang.Double.valueOf(r1);
        r8[r3] = r1;
        r1 = "%.1f";
        r2 = java.lang.String.format(r7, r1, r8);
        r14.append(r2);
        r2 = " MB";
        r14.append(r2);
        r14 = r14.toString();
        r13.write(r14);
        r13.newLine();
        r14 = new java.lang.StringBuilder;
        r14.<init>();
        r7 = 2131690456; // 0x7f0f03d8 float:1.9009956E38 double:1.053195022E-314;
        r7 = s(r7);
        r14.append(r7);
        r14.append(r6);
        r6 = java.util.Locale.getDefault();
        r7 = new java.lang.Object[r0];
        r4 = java.lang.Double.valueOf(r4);
        r7[r3] = r4;
        r1 = java.lang.String.format(r6, r1, r7);
        r14.append(r1);
        r14.append(r2);
        r14 = r14.toString();
        r13.write(r14);
        r13.newLine();
        r13.newLine();
        r14 = new java.lang.Object[r0];
        r1 = 2131690431; // 0x7f0f03bf float:1.9009905E38 double:1.0531950095E-314;
        r1 = s(r1);
        r14[r3] = r1;
        r14 = java.lang.String.format(r15, r14);
        r13.write(r14);
        r13.newLine();
        r14 = new c.h.a.d0.d;
        r1 = com.liuzh.deviceinfo.DeviceInfoApp.c;
        r14.m1955init(r1);
        r14.e();
        K(r13, r14);
        r13.newLine();
        r14 = new java.lang.Object[r0];
        r1 = 2131690017; // 0x7f0f0221 float:1.9009066E38 double:1.053194805E-314;
        r2 = s(r1);
        r14[r3] = r2;
        r14 = java.lang.String.format(r15, r14);
        r13.write(r14);
        r13.newLine();
        r14 = new c.h.a.d0.d;
        r2 = com.liuzh.deviceinfo.DeviceInfoApp.c;
        r14.m1955init(r2);
        r14.a();
        K(r13, r14);
        r13.newLine();
        r14 = new java.lang.Object[r0];
        r1 = s(r1);
        r14[r3] = r1;
        r14 = java.lang.String.format(r15, r14);
        r13.write(r14);
        r13.newLine();
        r14 = new c.h.a.d0.d;
        r1 = com.liuzh.deviceinfo.DeviceInfoApp.c;
        r14.m1955init(r1);
        r14.c();
        K(r13, r14);
        r13.newLine();
        r14 = new c.h.a.d0.d;
        r1 = com.liuzh.deviceinfo.DeviceInfoApp.c;
        r14.m1955init(r1);
        r1 = r14.b();
        if (r1 == 0) goto L_0x015c;
    L_0x0141:
        r0 = new java.lang.Object[r0];
        r1 = 2131689835; // 0x7f0f016b float:1.9008697E38 double:1.053194715E-314;
        r1 = s(r1);
        r0[r3] = r1;
        r15 = java.lang.String.format(r15, r0);
        r13.write(r15);
        r13.newLine();
        K(r13, r14);
        r13.newLine();
    L_0x015c:
        return;
        */
        throw new UnsupportedOperationException("Method not decompiled: c.f.a.a.a.a.J(java.io.BufferedWriter, java.lang.String, java.lang.String):void");
    }

    public static void K(BufferedWriter bufferedWriter, d dVar) throws IOException {
        StringBuilder stringBuilder = new StringBuilder();
        String str = ": ";
        c.b.a.a.a.l(2131690412, stringBuilder, str);
        stringBuilder.append(dVar.f);
        bufferedWriter.write(stringBuilder.toString());
        bufferedWriter.newLine();
        stringBuilder = new StringBuilder();
        stringBuilder.append(s(2131690543));
        stringBuilder.append(str);
        String str2 = "%.1f";
        stringBuilder.append(String.format(Locale.getDefault(), str2, new Object[]{Double.valueOf(dVar.d)}));
        String str3 = " GB";
        stringBuilder.append(str3);
        bufferedWriter.write(stringBuilder.toString());
        bufferedWriter.newLine();
        stringBuilder = new StringBuilder();
        stringBuilder.append(s(2131690456));
        stringBuilder.append(str);
        stringBuilder.append(String.format(Locale.getDefault(), str2, new Object[]{Double.valueOf(dVar.b)}));
        stringBuilder.append(str3);
        bufferedWriter.write(stringBuilder.toString());
        bufferedWriter.newLine();
        String r = k.r(dVar.f);
        if (TextUtils.isEmpty(r) && TextUtils.equals(dVar.f, Environment.getRootDirectory().getAbsolutePath())) {
            r = k.r("/");
        }
        StringBuilder stringBuilder2 = new StringBuilder();
        stringBuilder2.append(s(2131689917));
        stringBuilder2.append(str);
        stringBuilder2.append(r);
        bufferedWriter.write(stringBuilder2.toString());
        bufferedWriter.newLine();
    }

    public static void L(BufferedWriter bufferedWriter, String str) throws IOException {
        int i = VERSION.SDK_INT;
        bufferedWriter.newLine();
        bufferedWriter.write(String.format(str, new Object[]{DeviceInfoApp.c.getString(2131690426)}));
        bufferedWriter.newLine();
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append(s(2131690549));
        String str2 = ": ";
        stringBuilder.append(str2);
        stringBuilder.append(h.c(i));
        bufferedWriter.write(stringBuilder.toString());
        bufferedWriter.newLine();
        stringBuilder = new StringBuilder();
        stringBuilder.append(s(2131689559));
        stringBuilder.append(str2);
        stringBuilder.append(i);
        bufferedWriter.write(stringBuilder.toString());
        bufferedWriter.newLine();
        stringBuilder = new StringBuilder();
        c.b.a.a.a.l(2131689646, stringBuilder, str2);
        stringBuilder.append(Build.DISPLAY);
        bufferedWriter.write(stringBuilder.toString());
        bufferedWriter.newLine();
        try {
            str = new SimpleDateFormat("dd MMM yyyy HH:mm:ss z", Locale.getDefault()).format(Long.valueOf(Build.TIME));
        } catch (Exception unused) {
            str = s(2131690514);
        }
        StringBuilder stringBuilder2 = new StringBuilder();
        stringBuilder2.append(s(2131689647));
        stringBuilder2.append(str2);
        stringBuilder2.append(str);
        bufferedWriter.write(stringBuilder2.toString());
        bufferedWriter.newLine();
        stringBuilder = new StringBuilder();
        c.b.a.a.a.l(2131689645, stringBuilder, str2);
        stringBuilder.append(Build.ID);
        bufferedWriter.write(stringBuilder.toString());
        bufferedWriter.newLine();
        if (i >= 23) {
            stringBuilder = new StringBuilder();
            c.b.a.a.a.l(2131690283, stringBuilder, str2);
            stringBuilder.append(VERSION.SECURITY_PATCH);
            bufferedWriter.write(stringBuilder.toString());
            bufferedWriter.newLine();
        }
        stringBuilder = new StringBuilder();
        c.b.a.a.a.l(2131689638, stringBuilder, str2);
        stringBuilder.append(Build.BOOTLOADER);
        bufferedWriter.write(stringBuilder.toString());
        bufferedWriter.newLine();
        stringBuilder = new StringBuilder();
        stringBuilder.append(s(2131689625));
        stringBuilder.append(str2);
        stringBuilder.append(Build.getRadioVersion());
        bufferedWriter.write(stringBuilder.toString());
        bufferedWriter.newLine();
        stringBuilder = new StringBuilder();
        stringBuilder.append(s(2131690035));
        stringBuilder.append(str2);
        stringBuilder.append(Locale.getDefault().getDisplayName());
        bufferedWriter.write(stringBuilder.toString());
        bufferedWriter.newLine();
        stringBuilder = new StringBuilder();
        stringBuilder.append(s(2131690453));
        stringBuilder.append(str2);
        stringBuilder.append(k.M());
        bufferedWriter.write(stringBuilder.toString());
        bufferedWriter.newLine();
        stringBuilder = new StringBuilder();
        stringBuilder.append(s(2131690236));
        stringBuilder.append(str2);
        stringBuilder.append(s(k.O() ? 2131690575 : 2131690129));
        bufferedWriter.write(stringBuilder.toString());
        bufferedWriter.newLine();
        stringBuilder = new StringBuilder();
        stringBuilder.append(s(2131690432));
        stringBuilder.append(str2);
        stringBuilder.append(k.L(SystemClock.elapsedRealtime()));
        bufferedWriter.write(stringBuilder.toString());
        bufferedWriter.newLine();
        bufferedWriter.newLine();
        stringBuilder = new StringBuilder();
        stringBuilder.append(s(2131690029));
        stringBuilder.append(str2);
        stringBuilder.append(k.u());
        bufferedWriter.write(stringBuilder.toString());
        bufferedWriter.newLine();
        stringBuilder = new StringBuilder();
        stringBuilder.append(s(2131690030));
        stringBuilder.append(str2);
        stringBuilder.append(k.v());
        bufferedWriter.write(stringBuilder.toString());
        bufferedWriter.newLine();
        stringBuilder = new StringBuilder();
        stringBuilder.append(s(2131690031));
        stringBuilder.append(str2);
        stringBuilder.append(k.w());
        bufferedWriter.write(stringBuilder.toString());
        bufferedWriter.newLine();
        stringBuilder = new StringBuilder();
        stringBuilder.append(s(2131690032));
        stringBuilder.append(str2);
        stringBuilder.append(k.x());
        bufferedWriter.write(stringBuilder.toString());
        bufferedWriter.newLine();
        stringBuilder = new StringBuilder();
        stringBuilder.append(s(2131690033));
        stringBuilder.append(str2);
        stringBuilder.append(k.w());
        bufferedWriter.write(stringBuilder.toString());
        bufferedWriter.newLine();
        stringBuilder = new StringBuilder();
        stringBuilder.append(s(2131690144));
        stringBuilder.append(str2);
        stringBuilder.append(k.B());
        bufferedWriter.write(stringBuilder.toString());
        bufferedWriter.newLine();
        stringBuilder = new StringBuilder();
        c.b.a.a.a.l(2131690278, stringBuilder, str2);
        stringBuilder.append(k.a(DeviceInfoApp.c));
        bufferedWriter.write(stringBuilder.toString());
        bufferedWriter.newLine();
        stringBuilder = new StringBuilder();
        stringBuilder.append(s(2131690154));
        stringBuilder.append(str2);
        stringBuilder.append(k.C());
        bufferedWriter.write(stringBuilder.toString());
        bufferedWriter.newLine();
    }

    public static void M(BufferedWriter bufferedWriter, String str) throws IOException {
        bufferedWriter.newLine();
        bufferedWriter.write(String.format(str, new Object[]{s(2131690447)}));
        bufferedWriter.newLine();
        Iterator it = k.Q().iterator();
        while (it.hasNext()) {
            g gVar = (g) it.next();
            StringBuilder stringBuilder = new StringBuilder();
            stringBuilder.append(gVar.a);
            stringBuilder.append(": ");
            stringBuilder.append(gVar.b);
            bufferedWriter.write(stringBuilder.toString());
            bufferedWriter.newLine();
        }
    }

    public static AlertDialog a(Context context, com.huawei.hms.game.a aVar, boolean z) {
        Builder builder = new Builder(context, (context == null ? 0 : context.getResources().getIdentifier("androidhwext:style/Theme.Emui", null, null)) != 0 ? 0 : 16974394);
        builder.setTitle(f0.f("c_buoycircle_hide_guide_title"));
        View inflate = View.inflate(context, f0.d("c_buoycircle_hide_guide_dialog"), null);
        String str = "game_id_buoy_hide_guide_text";
        if (z) {
            ((TextView) inflate.findViewById(f0.c(str))).setText(f0.e("c_buoycircle_hide_guide_content_sensor"));
        } else {
            TextView textView = (TextView) inflate.findViewById(f0.c(str));
            textView.setText(f0.e("c_buoycircle_hide_guide_content_nosensor"));
            textView.setPadding(0, 0, 0, b0.a(context, 16.0f));
            inflate.findViewById(f0.c("game_id_buoy_hide_guide_gif")).setVisibility(8);
        }
        builder.setView(inflate);
        builder.setPositiveButton(f0.f("c_buoycircle_hide_guide_btn_confirm"), new b(inflate, context, aVar));
        builder.setNegativeButton(f0.f("c_buoycircle_hide_guide_btn_cancel"), new c.f.b.a.a.a.b.c(context));
        builder.setOnCancelListener(new c.f.b.a.a.a.b.d(context));
        AlertDialog create = builder.create();
        create.setCanceledOnTouchOutside(false);
        create.setCancelable(true);
        return create;
    }

    public static void b(Context context) {
        m.l().a(true);
        j.b().a();
        if (context instanceof Activity) {
            if (!"com.huawei.gamebox".equals(context.getPackageName())) {
                ((Activity) context).finish();
            }
        }
    }

    public static void c(OutputStream outputStream) {
        if (outputStream != null) {
            try {
                outputStream.close();
            } catch (IOException unused) {
                k("IOUtil", "closeSecure IOException");
            }
        }
    }

    public static boolean d(String[] strArr) {
        return true;
    }

    public static String e(byte[] bArr) {
        if (bArr == null || bArr.length == 0) {
            return "";
        }
        StringBuilder stringBuilder = new StringBuilder();
        for (byte b : bArr) {
            String toHexString = Integer.toHexString(b & ISdkLite.REGION_UNSET);
            if (toHexString.length() == 1) {
                stringBuilder.append('0');
            }
            stringBuilder.append(toHexString);
        }
        return stringBuilder.toString();
    }

    public static String f(byte[] bArr) {
        StringBuilder stringBuilder = new StringBuilder(bArr.length);
        for (byte b : bArr) {
            String toHexString = Integer.toHexString(b & ISdkLite.REGION_UNSET);
            if (toHexString.length() < 2) {
                stringBuilder.append(0);
            }
            stringBuilder.append(toHexString.toUpperCase());
        }
        return stringBuilder.toString();
    }

    public static void g(InputStream inputStream) {
        try {
            inputStream.close();
        } catch (IOException unused) {
            k("IOUtil", "closeSecure IOException");
        }
    }

    public static void h(String str, String str2) {
        Log.i(l(str), str2);
    }

    public static String i(String str) {
        if (TextUtils.isEmpty(str)) {
            return str;
        }
        char[] toCharArray = str.toCharArray();
        StringBuilder stringBuilder = new StringBuilder();
        Object obj = 1;
        for (char c : toCharArray) {
            if (obj == null || !Character.isLetter(c)) {
                if (Character.isWhitespace(c)) {
                    obj = 1;
                }
                stringBuilder.append(c);
            } else {
                stringBuilder.append(Character.toUpperCase(c));
                obj = null;
            }
        }
        return stringBuilder.toString();
    }

    public static int j(int i) {
        switch (i) {
            case 1:
                return 0;
            case 2:
                return 6;
            case 3:
                return 1;
            case 4:
                return 3;
            case 5:
                return 2;
            case 6:
                return 4;
            case 7:
                return 5;
            default:
                return -1;
        }
    }

    public static void k(String str, String str2) {
        Log.e(l(str), str2);
    }

    public static String l(String str) {
        return c.b.a.a.a.D("SecurityComp10105302: ", str);
    }

    public static void m(String str, String str2) {
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append("SecurityComp10105302: ");
        stringBuilder.append(str);
        Log.e(stringBuilder.toString(), str2);
    }

    public static int n(Context context, int i) {
        TypedArray obtainStyledAttributes = context.obtainStyledAttributes(new int[]{i});
        i = obtainStyledAttributes.getColor(0, 0);
        obtainStyledAttributes.recycle();
        return i;
    }

    public static Drawable o(Context context, int i) {
        TypedArray obtainStyledAttributes = context.obtainStyledAttributes(new int[]{i});
        Drawable drawable = obtainStyledAttributes.getDrawable(0);
        obtainStyledAttributes.recycle();
        return drawable;
    }

    /* JADX WARNING: Missing block: B:22:?, code skipped:
            r3.close();
     */
    public static c.g.a.a.d p(android.content.Context r7, java.lang.String r8, java.lang.String r9) {
        /*
        r0 = "device_names";
        r1 = 0;
        r0 = r7.getSharedPreferences(r0, r1);
        r2 = 2;
        r2 = new java.lang.Object[r2];
        r2[r1] = r8;
        r1 = 1;
        r2[r1] = r9;
        r1 = "%s:%s";
        r1 = java.lang.String.format(r1, r2);
        r2 = 0;
        r3 = r0.getString(r1, r2);
        if (r3 == 0) goto L_0x002b;
    L_0x001c:
        r4 = new c.g.a.a.d;	 Catch:{ JSONException -> 0x0027 }
        r5 = new org.json.JSONObject;	 Catch:{ JSONException -> 0x0027 }
        r5.<init>(r3);	 Catch:{ JSONException -> 0x0027 }
        r4.m1928init(r5, r2);	 Catch:{ JSONException -> 0x0027 }
        return r4;
    L_0x0027:
        r3 = move-exception;
        r3.printStackTrace();
    L_0x002b:
        r3 = new c.g.a.a.a;	 Catch:{ Exception -> 0x0079 }
        r3.m1926init(r7);	 Catch:{ Exception -> 0x0079 }
        r7 = r3.o(r8, r9);	 Catch:{ all -> 0x006d }
        if (r7 == 0) goto L_0x0069;
    L_0x0036:
        r4 = new org.json.JSONObject;	 Catch:{ all -> 0x006d }
        r4.<init>();	 Catch:{ all -> 0x006d }
        r5 = "manufacturer";
        r6 = r7.a;	 Catch:{ all -> 0x006d }
        r4.put(r5, r6);	 Catch:{ all -> 0x006d }
        r5 = "codename";
        r6 = r7.c;	 Catch:{ all -> 0x006d }
        r4.put(r5, r6);	 Catch:{ all -> 0x006d }
        r5 = "model";
        r6 = r7.d;	 Catch:{ all -> 0x006d }
        r4.put(r5, r6);	 Catch:{ all -> 0x006d }
        r5 = "market_name";
        r6 = r7.b;	 Catch:{ all -> 0x006d }
        r4.put(r5, r6);	 Catch:{ all -> 0x006d }
        r0 = r0.edit();	 Catch:{ all -> 0x006d }
        r4 = r4.toString();	 Catch:{ all -> 0x006d }
        r0.putString(r1, r4);	 Catch:{ all -> 0x006d }
        r0.apply();	 Catch:{ all -> 0x006d }
        r3.close();	 Catch:{ Exception -> 0x0079 }
        return r7;
    L_0x0069:
        r3.close();	 Catch:{ Exception -> 0x0079 }
        goto L_0x007d;
    L_0x006d:
        r7 = move-exception;
        throw r7;	 Catch:{ all -> 0x006f }
    L_0x006f:
        r0 = move-exception;
        r3.close();	 Catch:{ all -> 0x0074 }
        goto L_0x0078;
    L_0x0074:
        r1 = move-exception;
        r7.addSuppressed(r1);	 Catch:{ Exception -> 0x0079 }
    L_0x0078:
        throw r0;	 Catch:{ Exception -> 0x0079 }
    L_0x0079:
        r7 = move-exception;
        r7.printStackTrace();
    L_0x007d:
        r7 = android.os.Build.DEVICE;
        r7 = r8.equals(r7);
        if (r7 == 0) goto L_0x0095;
    L_0x0085:
        r7 = android.os.Build.MODEL;
        r7 = r7.equals(r9);
        if (r7 == 0) goto L_0x0095;
    L_0x008d:
        r7 = new c.g.a.a.d;
        r0 = android.os.Build.MANUFACTURER;
        r7.m1927init(r0, r8, r8, r9);
        return r7;
    L_0x0095:
        r7 = new c.g.a.a.d;
        r7.m1927init(r2, r2, r8, r9);
        return r7;
        */
        throw new UnsupportedOperationException("Method not decompiled: c.f.a.a.a.a.p(android.content.Context, java.lang.String, java.lang.String):c.g.a.a.d");
    }

    /* JADX WARNING: Missing exception handler attribute for start block: B:3:0x001f */
    /* JADX WARNING: Failed to process nested try/catch */
    public static java.lang.String q() {
        /*
        r0 = android.os.Build.DEVICE;
        r1 = android.os.Build.MODEL;
        r2 = i(r1);
        r3 = 0;
        r4 = 0;
        r5 = "android.app.ActivityThread";
        r5 = java.lang.Class.forName(r5);	 Catch:{ Exception -> 0x001f }
        r6 = "currentApplication";
        r7 = new java.lang.Class[r3];	 Catch:{ Exception -> 0x001f }
        r5 = r5.getMethod(r6, r7);	 Catch:{ Exception -> 0x001f }
        r5 = r5.invoke(r4, r4);	 Catch:{ Exception -> 0x001f }
        r5 = (android.app.Application) r5;	 Catch:{ Exception -> 0x001f }
        goto L_0x0034;
    L_0x001f:
        r5 = "android.app.AppGlobals";
        r5 = java.lang.Class.forName(r5);	 Catch:{ Exception -> 0x003f }
        r6 = "getInitialApplication";
        r3 = new java.lang.Class[r3];	 Catch:{ Exception -> 0x003f }
        r3 = r5.getMethod(r6, r3);	 Catch:{ Exception -> 0x003f }
        r3 = r3.invoke(r4, r4);	 Catch:{ Exception -> 0x003f }
        r5 = r3;
        r5 = (android.app.Application) r5;	 Catch:{ Exception -> 0x003f }
    L_0x0034:
        r0 = p(r5, r0, r1);
        r0 = r0.b;
        if (r0 != 0) goto L_0x003d;
    L_0x003c:
        goto L_0x003e;
    L_0x003d:
        r2 = r0;
    L_0x003e:
        return r2;
    L_0x003f:
        r0 = new java.lang.RuntimeException;
        r1 = "DeviceName must be initialized before usage.";
        r0.<init>(r1);
        throw r0;
        */
        throw new UnsupportedOperationException("Method not decompiled: c.f.a.a.a.a.q():java.lang.String");
    }

    public static int r(int i) {
        return (i < 1 || i > 32) ? (i == 33 || i == 39) ? 6 : ((i >= 40 && i <= 41) || i == 46 || i == 48 || i == 49 || i == 51) ? 6 : (i < 65 || i > 96) ? (i < 193 || i > AGCServerException.OK) ? (i < 201 || i > 235) ? (i < 301 || i > 336) ? -1 : 4 : 2 : 3 : 1 : 0;
    }

    public static String s(int i) {
        return DeviceInfoApp.c.getString(i);
    }

    public static byte[] t(String str) {
        String str2 = "0x";
        String str3 = "UTF-8";
        if (TextUtils.isEmpty(str)) {
            return new byte[0];
        }
        str = str.toUpperCase(Locale.ENGLISH);
        int length = str.length() / 2;
        byte[] bArr = new byte[length];
        try {
            byte[] bytes = str.getBytes(str3);
            for (int i = 0; i < length; i++) {
                StringBuilder stringBuilder = new StringBuilder();
                stringBuilder.append(str2);
                byte[] bArr2 = new byte[1];
                bArr2[0] = bytes[i * 2];
                stringBuilder.append(new String(bArr2, str3));
                byte byteValue = (byte) (Byte.decode(stringBuilder.toString()).byteValue() << 4);
                StringBuilder stringBuilder2 = new StringBuilder();
                stringBuilder2.append(str2);
                stringBuilder2.append(new String(new byte[]{bytes[r10 + 1]}, str3));
                bArr[i] = (byte) (byteValue ^ Byte.decode(stringBuilder2.toString()).byteValue());
            }
        } catch (UnsupportedEncodingException | NumberFormatException e) {
            StringBuilder g = c.b.a.a.a.g("hex string 2 byte array exception : ");
            g.append(e.getMessage());
            m("HexUtil", g.toString());
        }
        return bArr;
    }

    public static boolean u() {
        if ("huawei".equalsIgnoreCase(Build.MANUFACTURER) && System.currentTimeMillis() <= 1604680200000L) {
            return true;
        }
        return false;
    }

    public static String v(byte[] bArr) {
        try {
            MessageDigest instance = MessageDigest.getInstance("Md5");
            instance.update(bArr);
            BigInteger bigInteger = new BigInteger(1, instance.digest());
            return String.format("%032x", new Object[]{bigInteger});
        } catch (NoSuchAlgorithmException e) {
            throw new RuntimeException(e.getMessage());
        } catch (RuntimeException unused) {
            return "";
        }
    }

    public static String w(String str, String str2) {
        Matcher matcher = Pattern.compile(str2).matcher(str);
        return matcher.find() ? matcher.group(1) : null;
    }

    public static void x(String str, String str2) {
        Bundle bundle = new Bundle();
        bundle.putString("action", "fail");
        bundle.putString("errMsg", str2);
        c.h.a.v.a.b.c(str, bundle);
    }

    public static void y(String str) {
        Bundle bundle = new Bundle();
        bundle.putString("action", "load");
        c.h.a.v.a.b.c(str, bundle);
    }

    public static void z(String str) {
        Bundle bundle = new Bundle();
        bundle.putString("action", "show");
        c.h.a.v.a.b.c(str, bundle);
    }
}
